##############################################################################

## This file is a shell script fragment that supplies the information
## necessary to tailor a template configure script into the configure
## script appropriate for this directory.  For more information, check
## any existing configure script.  

## Be warned, there are two types of configure.in files.  There are those
## used by Autoconf, which are macros which are expanded into a configure
## script by autoconf.  The other sort, of which this is one, is executed
## by Cygnus configure.  

## For more information on these two systems, check out the documentation
## for 'Autoconf' (autoconf.texi) and 'Configure' (configure.texi).  

##############################################################################

### To add a new directory to the tree, first choose whether it is a target
### or a host dependent tool.  Then put it into the appropriate list
### (library or tools, host or target), doing a dependency sort.  For
### example, gdb requires that byacc (or bison) be built first, so it is in
### the ${host_tools} list after byacc and bison.  

# these tools are built for the host environment
#
host_tools="kernel x11 SelFile curses lib doc test misc"

configdirs=`echo ${host_libs} ${host_tools} ${target_libs} ${target_tools}`

################################################################################

srctrigger=move-if-change
srcname="Xconq"

# per-host:

host_makefile_frag=`${srcdir}/config.host ${host} .`

# per-target:

# some tools are so dependent upon X11 that if we're not building with X, 
# it's not even worth trying to configure, much less build, that tool.

case ${with_x} in
  yes | "")  # the default value for this tree is that X11 is available
	;;
  no)
    	configdirs=`echo " ${configdirs} " | sed -e 's/ x11 / /'`
	;;
  *)
    	echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2
    	;;
esac


case ${enable_selfile} in
  yes | "")  # the default value for this tree is that SelFile is available
	;;
  no)
	noconfigdirs="SelFile"
	;;
  *)
    	echo "*** bad value \"${enable_selfile}\" for --enable-selfile flag; ignored" 1>&2
    	;;
esac


notsupp=""
for dir in . $noconfigdirs ; do
  if [ $dir != . ] && echo "# ${configdirs} #" | grep "${dir} " >/dev/null 2>&1 ; then
    configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
    if [ -r $srcdir/$dir/configure ] || [ -r $srcdir/$dir/configure.in ]; then
      notsupp="$notsupp $dir"
    fi
  fi
done

# Produce a warning message for the subdirs we can't configure.
# This isn't especially interesting in the Cygnus tree, but in the individual
# FSF releases, it's important to let people know when their machine isn't
# supported by the one or two programs in a package.

if [ -n "${notsupp}" ] && [ -z "${norecursion}" ]; then
  echo "*** This configuration is not supported in the following subdirectories:" 1>&2
  echo "    ${notsupp}" 1>&2
  echo "    (Any other directories should still work fine.)" 1>&2
fi

#
# Local Variables:
# fill-column: 131
# End:
#
